<%--
 *  File:    LogManagement.jsp
 *  @Author: jamesli 
 *  Date:    2010/08/03
 *
 *  Copyright (C) 2000 - 2008 Oval Technologies, Inc.
 *  All rights reserved.
 *
 *  This software is the confidential and proprietary information of Oval
 *  Technologies, Inc. ("Confidential Information").  You shall not
 *  disclose such Confidential Information and shall use it only in
 *  accordance with the terms of the license agreement you entered into
 *  with Oval.
--%>
<%
  //init param
  String privilegeCode = "E0543";
  String strTableName = "v_loginfo";
  String strModuleName = "CFM";
	String contextPath = request.getContextPath();
	
%>
<%@ include file="/inc/CommonHeader.inc"%>
<%@ include file="/inc/OvalLocationDefault.inc"%>
<html>
	<head>
		<title>LogManagement</title>
		<PageFlow:CheckPageFlow pageName="p_loginfo" />
		<%@ include file="/inc/SumDiv.inc"%>
		<%
  Vector totalsummary = (Vector)pageContext.getAttribute("totalsummary");
  if(totalsummary == null) totalsummary = new Vector();

  HashMap UserInfo = (HashMap)session.getAttribute("userinfo");
  if(UserInfo == null) UserInfo = new HashMap();
  

%>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet"
	href="<%=contextPath%>/css/<%= strLanguageCode %>/main.css"
	type="text/css">
<script language="JavaScript"
	src="<%=contextPath%>/css/<%= strLanguageCode %>/script.js"></script>
<script language="JavaScript" src="<%=contextPath%>/js/ScriptLib.js"></script>
<script language="JavaScript"
	src="<%=contextPath%>/js/SummaryDivision.js"></script>
<%@ include file="/inc/NewCalendar.inc" %>
<script language="JavaScript">

<%--  put your custom script here   --%>


function page_summary(actionvalue,orderbyname)
{
if(!checkForm(document.cform))
    return;
  var editform = summaryPrepare(cform,actionvalue,orderbyname);
  if(!editform)return;
  	editform.action = "LogManagement.jsp?<%= OvalTools.randomURL() %>";
    editform.target = "_self";
    isRunning = true;
    editform.submit();

  
}
function checkall()
{
  if(cform.selorgids)
      {
         if(cform.selorgids.length)
         {
             for(var i=0;i<cform.selorgids.length;i++)
             {

                  cform.selorgids[i].checked=cform.selectall.checked;
             }
         }else
         {
             cform.selorgids.checked=cform.selectall.checked;
         }


      }
}

<%----------------------------------????-------------------------------%>		
function search()
{
	cform.searchname1.value="";
    cform.searchname1.value=cform.namefile.value;

    
     cform.action = "LogManagement.jsp?<%= OvalTools.randomURL() %>";
	  cform.target = "_self";

	  cform.submit();

}
dateformat = '<%=JspHelper.filterNull( session.getAttribute("dateformat") )%>';
function file_delete()
{


	if(isNullChecked(cform.deleteids))
    {
        alert("<%= message.getMessageDesc("MUST_SELECT_ONE_RECORD_TO_DEL") %>");
        return;
    }	
	if ( ! confirm("<%= message.getMessageDesc("ARE_YOU_SURE") %>") )  return;
	  cform.actionname.value="tagdelete";
	  isRunning = true;
    cform.submit();

}

function file_alldelete()
{
	if ( ! confirm("<%= message.getMessageDesc("ARE_YOU_SURE") %>") )  return;
	  cform.actionname.value="delete";
	  isRunning = true;
    cform.submit();
        
}
function allcheckselect(){
	var allcheck = cform.allcheck.checked;
	var alldatafile = document.getElementsByName('deleteids');
	var length = alldatafile.length;
	if(allcheck){
		for(var i = 0 ; i < length;i++){
			alldatafile[i].checked = true;
		}
	}else{
		for(var i = 0 ; i < length;i++){
			alldatafile[i].checked = false;
		}	
	}
}
</script>
	</head>
	<body style="overflow: auto;">
		<form name="cform" method="post" action="<%=contextPath%>/Dispatcher">
			<input type="hidden" name="pagename" value="p_loginfo">
			<input type="hidden" name="actionname">
			<input type="hidden" name="provinceid">
			<input type="hidden" name="cityid">
			<input type="hidden" name="dealerid">
			<input type="hidden" name="type">
			<input type="hidden" name="name">
			<input type="hidden" name="salesdatafileidstring">
			<input type="hidden" name="searchname1">
			<input type="hidden" name="mark" value="1" /> 
			<custom:hidden property="filename"  />
			<%--  page location   --%>
			<%@ include file="/inc/PageLocation.inc"%>
			<table width="100%" cellspacing="0" border="0" cellpadding="0">
				<tr>
					<td  style="width:300px">
						<%= label.getLabelName("L_TransType") %><%= label.getLabelName("L_Colon") %>
						<custom:selectdic dictType="DataCleanType" property="datatype" defaultValue="--------" defaultValueCost=""  command="notnull" label="L_TransType"/>
					</td>
					<td>
						<table width="100%" border="0" cellspacing="0">
							<%@ include file="/inc/SummarySearch.inc"%>
						</table>
					</td>
				</tr>
				<tr>
					<td colspan="2">
						<table width="100%" border="1" cellpadding="0"
							bordercolorlight="#999999" bordercolordark="#FFFFFF"
							cellspacing="0" align="center">
							<tr class="deepblue-left">
								<%---------------------------------- ??-------------------------------%>
								<td width="22" class="title_center"><input type="checkbox" name="allcheck" class="normalradio" onclick="allcheckselect();"></td>
								<td class="title_center" width="50"><%= label.getLabelName("L_Serial") %></td>
								<td class="title_center" width="250"><%= label.getLabelName("L_RunTime2") %></a>
								</td>
								<td class="title_center" width="250"><%= label.getLabelName("L_filename") %></a>
								</td>
								<td class="title_center" width="250"><%= label.getLabelName("L_MsgDescription") %></a>
								</td>
							</tr>
							<%
					int i=0;
					String strClassType="";
				%>
							<logic:iterate id="onerow" collection="<%=totalsummary %>"
								indexId="idx">
								<%
							if(i%2 == 1)
							  {
							    strClassType = "td-listrom";
							  }else{                    
							    strClassType = "none";
							  }
							  i++;
						%>
								<%---------------------------------- ??????-------------------------------%>
								<tr onMouseOver="this.className='tr-over'"
									onMouseOut="this.className='<%=strClassType%>'"
									class="<%=strClassType%>">
									<td>
										<custom:checkbox property="datafileactionlogid" name="onerow" changedName="deleteids" styleClass="normalradio"/>
									</td>
									<td>
										<%=i %>
									</td>
									<td>
										<custom:write property="createdate" name="onerow" dataType="date" dataFormat="yyyy-MM-dd HH:mm:ss" nbsp="true" />
									</td>
									<td>
										<custom:write property="filename" name="onerow" nbsp="true" />
									</td>
									<td>
										<custom:write property="description" name="onerow" nbsp="true" />
									</td>
							</logic:iterate>
							<%@ include file="/inc/SummaryAction.inc"%>
						</table>
						<table width="100%" cellspacing="0" cellpadding="0">
							<tr>
								<td class="summary_top"></td>
							</tr>
							<tr>
								<td class="td_center">
									<a onclick="file_delete();"><custom:button type="1" label="L_Clear1" border="0" style="width:60" privilegeCode="MB-WJRZ01"/></a>
									<a onclick="file_alldelete();"><custom:button type="1" label="L_AllDelete" border="0" style="width:60" privilegeCode="MB-WJRZ02"/></a>
								</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
		</form>
	</body>
</html>